package com.sj.purchase.modules.cost.domain.order;

import javax.persistence.*;
import java.util.HashSet;
import java.util.Set;

/**
 * 入库订单表
 * Created by icodebug on 17-7-16.
 */
@Entity
@Table(name = "t_in_order")
public class InOrder extends Order {

    private String supplierName;//供应商名字

    @OneToMany(mappedBy = "order", fetch = FetchType.EAGER, orphanRemoval = true, cascade = CascadeType.ALL)
    private Set<InOrderItem> orderItems = new HashSet<>();

    public String getSupplierName() {
        return supplierName;
    }

    public InOrder setSupplierName(String supplierName) {
        this.supplierName = supplierName;
        return this;
    }

    public Set<InOrderItem> getOrderItems() {
        return orderItems;
    }

    public void setOrderItems(Set<InOrderItem> orderItems) {
        this.orderItems = orderItems;
    }
}
